<?php

namespace App\Http\Requests;


class CzChannelRequest extends BaseRequest
{
    public function rules()
    {
        return [
            'channel_name' => 'required|between:1,50|unique:cz_channel,channel_name,'.$this->post('id'),
            'channel_code' => 'required',
            'status' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'channel_name.required' => '渠道名称必须填写',
            'channel_name.unique' => '渠道名称已存在',
            'channel_name.between' => '渠道名称1-50个字符之间',
            'channel_code.required' => '请选择渠道模板',
            'status.required' => '请选择状态',
        ];
    }
}
